Make DXL script interruptible

Any suggestions on how to make a DXL script interruptible?

Would be good if there was some way like ctrl-c to stop a script from running if it is taking longer than anticipated to execute.

the only way I know is to kill the DOORS session which is not very good.

I thought of maybe getting the loop to check for the existence of a file on the filesystem and stop if it is detected. A bit of a clunky solution though.

 


DoorsXLAustralia - Tue Dec 01 19:34:48 EST 2015

Re: Make DXL script interruptible
morast - Wed Dec 02 09:41:53 EST 2015

Well, there is the progress bar functionality. Have a look at the "progressCancelled" perm

Re: Make DXL script interruptible
a8155058 - Wed Dec 02 16:20:55 EST 2015

pragma runLim, someValue

Re: Make DXL script interruptible
DoorsXLAustralia - Thu Dec 03 20:40:41 EST 2015

^

^^

Good suggestions, thanks

Would be nice if DOORS had some key combination that allowed interruption of custom DXL scripts during execution so that they don't have to be prepared for interruptibility in advance.

Re: Make DXL script interruptible
Mathias Mamsch - Fri Dec 04 07:22:56 EST 2015

DoorsXLAustralia - Thu Dec 03 20:40:41 EST 2015

^

^^

Good suggestions, thanks

Would be nice if DOORS had some key combination that allowed interruption of custom DXL scripts during execution so that they don't have to be prepared for interruptibility in advance.

I has it one time, that a very intensive report would not finish for hours in time and I desperately needed the results, but they were stored to a module and the module was not saved inbetween the run. So If I would have killed the DOORS client all results would be lost.

I was able to solve that by:

- Attaching a Debugger to the DOORS.exe process

- Navigating to one of the perms I used in my DXL program and put a breakpoint

- once it hit the breakpoint, I triggered a "null parameter error" inside the perm, by flipping a bit.

The DXL aborted with error. I could save the module. The results were saved. hurray.

 

Also a rather "clunky" solution - anyway I wanted to add this for completeness purposes. If someone is interested on how to do that, I can make a tutorial/video on that. Regards, Mathias

Re: Make DXL script interruptible
Mathias Mamsch - Fri Dec 04 07:26:41 EST 2015

By the way, global state is the only way to abort a running DXL from inside, when it is not able to receive any input. You need to check continuously for something - and I guess a File is about the easiest thing you could think of.

Still I think a more DXLish way would be to use a progressBar on the Project Explorer for scripts with a very long runtime. This way the user might get a hint if he shall go home and come again tomorrow, or just grab a cup of coffee.

Regards, Mathias

Re: Make DXL script interruptible
DoorsXLAustralia - Sun Dec 06 09:04:05 EST 2015

Thanks Mathias,

Some good ideas.

>>The DXL aborted with error. I could save the module. The results were saved. hurray.

Yes,  I usually write results to a module and save the module on each iteration so at least I will have some results if i end up having to kill the DOORS client.

Sean

Re: Make DXL script interruptible
pommCannelle - Tue Dec 15 11:08:14 EST 2015

Hi ! 

Can i ask why you are dumping data in a module instead of a file ?? A file can be accessed from your favorite text editor during the DXL execution  ... 

For the interruption part ... My best solution is the automation of a second client, running in an other station, using a third part application.
So my DOORS client stays available waiting the results of my DXLs and I am able to interrupt my treatments using the third part application.

 

Regards !